version "14.1-20140302.1 [builder]";
dynamic-profiles {
    IP-DHCP-PROFILE-1 {
        interfaces {
            "$junos-interface-ifd-name" {
                unit "$junos-underlying-interface-unit";
            }
        }
    }
    VLAN-PROFILE-1 {
        interfaces {
            "$junos-interface-ifd-name" {
                unit "$junos-interface-unit" {
                    vlan-id "$junos-vlan-id";
                    family inet {
                        unnumbered-address lo0.0 preferred-source-address 192.168.0.1;
                    }
                }
            }
        }
    }
}
system {
    host-name vmx-20;
    time-zone GMT+4;
    root-authentication {
        encrypted-password "$1$r1mevasJ$eSMgu20mBd7qe91Y9Hc3L/"; ## SECRET-DATA
    }
    name-server {
        8.8.4.4;
    }
    dynamic-profile-options {
        versioning;
    }
    login {
        user warrior {
            uid 2000;
            class super-user;
            authentication {
                encrypted-password "$1$CP6.Oezz$vcaU1R2xnijIFVcP66uP9."; ## SECRET-DATA
            }
        }
    }
    services {
        telnet;
    }
    syslog {
        user * {
            any emergency;
        }
        file messages {
            any notice;
            authorization info;
            interactive-commands none;
        }
        file interactive-commands {
            interactive-commands any;
        }
    }
}
chassis {
    network-services enhanced-ip;
}
access-profile Access-Profile-1;
interfaces {
    ge-0/0/1 {
        description "-- uplink & OOB";
        mtu 2000;
        gigether-options {
            no-flow-control;
        }
        unit 0 {
            family inet {
                address 192.168.64.20/24;
            }
        }
    }
    ge-0/0/2 {
        description "-- subscriber access";
        flexible-vlan-tagging;
        auto-configure {
            vlan-ranges {
                dynamic-profile VLAN-PROFILE-1 {
                    accept dhcp-v4;
                    ranges {
                        any;
                    }
                }
            }
            remove-when-no-subscribers;
        }
        mtu 2000;
        encapsulation flexible-ethernet-services;
        gigether-options {
            no-flow-control;
        }
    }
    ge-0/0/3 {
        description "-- FREEBSD Server";
        mtu 2000;
        gigether-options {
            no-flow-control;
        }
        unit 0 {
            family inet {
                address 192.168.99.1/24;
            }
        }
    }
    lo0 {
        unit 0 {
            family inet {
                address 1.1.1.20/32 {
                    primary;
                    preferred;
                }
                address 192.168.0.1/32;
            }
        }
    }
}
forwarding-options {
    dhcp-relay {
        overrides {
            always-write-giaddr;
        }
        server-group {
            MY-EXTERNAL-DHCP-SERVER {
                192.168.99.2;
            }
        }
        group 1 {
            active-server-group MY-EXTERNAL-DHCP-SERVER;
            authentication {
                password 123;
                username-include {
                    mac-address;
                }
            }
            dynamic-profile IP-DHCP-PROFILE-1;
            interface ge-0/0/2.0;
        }
    }
}
routing-options {
    static {
        route 0.0.0.0/0 {
            next-hop 192.168.64.2;
            no-readvertise;
        }
    }
    router-id 1.1.1.20;
    autonomous-system 20;
    forwarding-table {
        export lb;
    }
}
policy-options {
    policy-statement lb {
        then {
            load-balance per-packet;
        }
    }
}
access {
    profile Access-Profile-1 {
        accounting-order radius;
        authentication-order radius;
        radius {
            authentication-server 192.168.99.2;
            accounting-server 192.168.99.2;
            options {
                nas-port-id-delimiter :;
                calling-station-id-delimiter :;
                calling-station-id-format {
                    nas-identifier;
                    interface-description;
                }
                accounting-session-id-format decimal;
                coa-dynamic-variable-validation;
            }
        }
        radius-server {
            192.168.99.2 {
                port 1812;
                accounting-port 1813;
                secret "$9$45Zi.Qz6AtOQFCu0Byr"; ## SECRET-DATA
                timeout 5;
                retry 3;
                max-outstanding-requests 200;
            }
        }
        accounting {
            order radius;
            immediate-update;
            coa-immediate-update;
            update-interval 10;
            statistics volume-time;
        }
    }
}
